package com.acwing.partition37;

import java.io.*;

/**
 * @author rkc
 * @date 2022/7/20 10:03
 */
public class AC3619日期 {

    private static final String[] ss = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
    private static final int[] months = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
    private static int month, day;

    private static StreamTokenizer tokenizer = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
    private static PrintWriter writer = new PrintWriter(new OutputStreamWriter(System.out));

    public static void main(String[] args) throws IOException {
        month = nextInt(); day = nextInt();
        int m = 4, d = 12, cur = 4;
        while (m < month || d < day) {
            d++;
            if (d > months[m]) {
                d = 1;
                m++;
            }
            cur = (cur + 1) % 7;
        }
        writer.println(ss[cur]);
        writer.flush();
    }

    private static int nextInt() throws IOException {
        tokenizer.nextToken();
        return (int) tokenizer.nval;
    }
}
